// base library
import {
  Layout,
  Menu,
  Breadcrumb,
  Button,
  Table,
  Select,
  DatePicker,
  Card,
  Form,
  Row,
  Col,
  Input,
  Spin,
  Space,
  message,
  Modal,
  notification,
  List,
  FormItem,
  Radio,
  Tag,
  Checkbox,
  Alert,
  Tree,
  Tabs,
  Badge,
  Tooltip,
  Dropdown,
  Collapse,
  Descriptions,
  Transfer,
  Upload
} from "ant-design-vue";

// ext library
import { VueAxios } from "@/utils/request";

export default (app: any) => {
  // load base library
  app.use(Layout);
  app.use(Menu);
  app.use(Breadcrumb);
  app.use(Button);
  app.use(Table);
  app.use(Select);
  app.use(DatePicker);
  app.use(Card);
  app.use(Form);
  app.use(Row);
  app.use(Col);
  app.use(Input);
  app.use(Spin);
  app.use(Space);
  app.use(Modal);
  app.use(Radio);
  app.use(Tag);
  app.use(Checkbox);
  app.use(Alert);
  app.use(Tree);
  app.use(Tabs);
  app.use(Badge);
  app.use(Tooltip);
  app.use(Dropdown);
  app.use(Collapse);
  app.use(Descriptions);
  app.use(Transfer);
  app.use(Upload);
  app.config.globalProperties.$message = message;
  app.config.globalProperties.$confirm = Modal.confirm;
  app.config.globalProperties.$notification = notification;
  app.config.globalProperties.$info = Modal.info;
  app.config.globalProperties.$success = Modal.success;
  app.config.globalProperties.$error = Modal.error;
  app.config.globalProperties.$warning = Modal.warning;

  // load ext library
  app.use(VueAxios);
  app.use(Input);
  app.use(Form);
  app.use(Modal);
  app.use(FormItem);
  app.use(List);
  app.use(Row);
  app.use(Col);
};
